import React, {useState} from "react";
import { List } from "immutable";

export default function App() {
    const [list] = useState([1,2,3]);

    const oldList = List(list);
    const newList = oldList.push(4, 5);

    return <div>
        {console.log(newList.toJS())}
        <ul>
            {newList.map(item => <li key={item}>{item}</li>)}
        </ul>
    </div>;
}